home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mtgrap1c / demo1.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-13  |  1.6 KB  |  63 lines

  1. /*                                                            
  2.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  3.   ▒                                                          ▒
  4.   ▒                                                          ▒
  5.   ▒             Neuromancer's Graphics Library               ▒
  6.   ▒                     Version 1.0c                         ▒
  7.   ▒                                                          ▒
  8.   ▒   This program display random pixels on the whole        ▒
  9.   ▒   screen and then in a clipped region                    ▒ 
  10.   ▒                                                          ▒   
  11.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  12.   ▒                                                          ▒
  13.   ▒     Project:    MTLIB01.LIB                              ▒
  14.   ▒                 DEMO1.CPP                                ▒
  15.   ▒                                                          ▒ 
  16.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  17. */
  18.  
  19. #include <iostream.h>
  20. #include <conio.h>
  21. #include <stdlib.h>
  22. #include "video.h"
  23.  
  24. void main(void)
  25. {
  26.  
  27.     mtSetVGAMode();            //Set up VGA Mode
  28.  
  29.     randomize();
  30.  
  31.     while(!kbhit())
  32.     {
  33.        mtPutPixel( random(320),random(200),random(256));
  34.     }
  35.  
  36.     getch();
  37.  
  38.     mtClrScr(0);
  39.  
  40.     mtSetWindow(15,15,304,184);    //set up clip region
  41.     mtClrScr(50);            //clear region to color 15
  42.  
  43.     while(!kbhit())
  44.     {
  45.        mtCPutPixel( random(320),random(200),random(256));
  46.     }
  47.  
  48.     getch();
  49.     mtSetTextMode();
  50.  
  51.     cout << "Thank you for using the library!" << endl;
  52.  
  53.     exit(0);
  54.     
  55. }
  56.  
  57.            
  58.             
  59.  
  60.            
  61.  
  62.            
  63.